home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_plotutils.idb / usr / freeware / share / ode / lorenz.ode.z / lorenz.ode
Encoding:
Text File  |  1998-10-28  |  765 b   |  33 lines

  1. # This example displays a beautiful strange attractor: the Lorenz
  2. # attractor.
  3.  
  4. # You may run this example by doing:
  5. #
  6. #    ode < lorenz.ode | graph -T X -C
  7. #
  8. # or alternatively, to get a real-time plot,
  9. #
  10. #    ode < lorenz.ode | graph -T X -C -x -10 10 -y -10 10
  11. #
  12. # You may also produce and print a Postscript version by doing
  13. #
  14. #    ode < lorenz.ode | graph -T ps -C -x -10 10 -y -10 10 -W 0 | lpr
  15. #
  16. # The `-W 0' sets the line width for the Postscript plot to
  17. # be zero.  That means that the thinnest line possible will be used.
  18.  
  19. # The Lorenz model, a third order system.
  20. # Interesting cases are r = 26, 2.5<t<30, x = z = 0, y = 1
  21. # and r = 17, 1<t<50, x = z = 0, y = 1.
  22. x' = -3*(x-y)
  23. y' = -x*z+r*x-y
  24. z' = x*y-z
  25.  
  26. r = 26
  27. x = 0
  28. y = 1
  29. z = 0
  30.  
  31. print x, y
  32. step 0, 200
  33.